package com.promfy.bughunter.db;


import java.util.List;

import android.test.AndroidTestCase;
import android.util.Log;

import com.promfy.bughunter.domain.Score;

public class DBTestUtil extends AndroidTestCase{
	private static final String TAG = "test";
	private Score score;
	public void testUpdateInfoService(){
		Score score = new Score("20120217", "345"); 
		Score score1 = new Score("20120218", "23423");
		Score score2 = new Score("20120219", "212");
		
		try {
			DBService dbs = new DBService(getContext());
			dbs.insert(score);
			dbs = new DBService(getContext());
			dbs.insert(score1);
			dbs = new DBService(getContext());
			dbs.insert(score2);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public void tesGet(){
		DBService dbs = new DBService(getContext());
		try {
			List<Score> scoreList = dbs.getAll();
			for(Score score : scoreList){
				Log.d("bug", score.getDate() + " " + score.getScore());
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
